#include<iostream>
using namespace std;
const int N = 110, M = 2e4 + 10;
bool f[M];
int a[N][3];
int n, m;
int main()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++) {
		cin >> a[i][0] >> a[i][1];
	}
	f[0] = 1;
	for (int i = 1; i <= n; i++) {
		for (int j = m; j >= min(a[i][1],a[i][0]); j--) {
			f[j + a[i][1]] |= f[j];
			f[j + a[i][0]] |= f[j];
		}
	}
	//for (int i = 1; i <= n; i++) {
	//	for (int j = m; j >= min(a[i][0],a[i][1]); j--) {
	//		for (int k = 0; k < 2; k++) {
	//			f[j] |= (f[j - a[i][k]]);
	//			//cout << "f[j]==" << f[j] << endl;
	//		}
	//	}
	//}
	/*for (int i = 1; i <= 20; i++) {
		cout << "i==" << i << endl;
		cout << "ans==" << f[i] << endl;
	}*/
	if (f[m])cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}